# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=zizzania
pkgver=124.8f2062f
pkgrel=1
groups=('blackarch' 'blackarch-wireless' 'blackarch-dos' 'blackarch-sniffer')
pkgdesc='Automated DeAuth attack.'
arch=('x86_64' 'aarch64')
url='https://github.com/cyrus-and/zizzania'
license=('custom:unknown')
depends=('libpcap' 'uthash')
makedepends=('git' 'scons')
source=("git+https://github.com/cyrus-and/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i 's|/usr/local|/usr|g' Makefile
}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  install -Dm 755 "src/$pkgname" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

